package com.niiwoo.civet.trade.enums.creditorSale;

import com.niiwoo.tripod.provider.exception.NoSuchEnumValueException;

import lombok.AllArgsConstructor;
import lombok.Getter;

@Getter
@AllArgsConstructor
public enum SaleDetailEndTypeEnum {
	INITIALIZATION((byte) 0, "初始化"), 
	USER_OPERATION((byte) 1, "用户取消"), 
	EXPIRE((byte) 2, "已过期"), 
	REFUND((byte) 3, "还款"),
	OTHER((byte) 4, "其他");
	
	private Byte value;
	
	private String remark;

	public static SaleDetailEndTypeEnum enumOf(byte value) {
		for (SaleDetailEndTypeEnum typeEnum : values()) {
			if (typeEnum.value.equals(value)) {
				return typeEnum;
			}
		}
		throw new NoSuchEnumValueException("SaleDetailEndTypeEnum:" + value);
	}
}
